home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / ViewIt™ 2.24 Shareware / FaceWare / FaceWare.rsrc / TEXT_1265_V7. Balloons.txt < prev    next >
Text File  |  1994-04-10  |  3KB  |  32 lines

  1. V7. Balloons (System 7)
  2.   The Help Manager chapter in Inside Mac V6 would lead you to believe that adding balloon help for controls in ViewIt windows would be exceedingly difficult due to the dynamic nature of these windows.  The fact is that we have made this exceedingly simple by having ViewIt do most of the work.
  3.  
  4. Help Command Format
  5.     When in help mode under System 7, balloon help defined by "help commands" is automatically displayed by ViewIt as the cursor is moved over controls.  The help commands can be added to the "Instructions" string associated with each control (set in ViewIt's Control dialog), and have the form,
  6.  
  7.   h¬©[help type],[help data]
  8.  
  9. where "help type" refers to the type of help resource associated with the control, and "help data" is either the actual help text, an index number into an STR# string list, or a resource ID number.
  10.   No more than one help command should appear in each control's instruction string, and it should be separated from any other commands (such as ViewBV 's "activate" and "show" commands) by a carriage return. The help type/data pairs supported by ViewIt are:
  11.  
  12.  Help Type   Help Data
  13.      1       help text string
  14.      2       PICT ID
  15.      6       TEXT/styl ID*
  16.      7       STR ID
  17.   STR# ID    index into STR#
  18. * The Help Manager has problems wrapping large blocks of text.  Use carriage returns to help format large TEXT blocks.
  19.  
  20.   You can also base balloon help on the current control state.  This is done by specifying one or two additional "help data" parameters (separated by commas) that correspond to the "inactive" and "checked" states of the control (if these are not specified, then the first help data is always used).
  21.  
  22. Example Commands
  23. h©1002,4
  24. ...use 4th string in STR# 1002 as help text
  25. h©6,1020
  26. ...use TEXT/styl 1020 pair to display styled help text
  27. h¬©1,This is my control
  28. ...use "This is my control" as help text
  29. h©2,1051,1052,1053
  30. ...use PICT 1051 for active unchecked state, PICT 1052 when inactive, and PICT 1053 when checked
  31.  
  32. TIP:  You might be tempted to simply use help type 1 to make the help text part of the control record, but this has three drawbacks:  First, since commas are used to delimit successive help entries, and carriage returns denote the end of a command, neither commas nor carriage returns can be part of type 1 help text.  Second, help text saved as part of the control record is not purgeable from memory while the control is in use.  Third, such help text can never be shared between controls.  The logical thing to do in most cases will be to use STR# string lists, although type 1 help text can be useful when experimenting with the appearance of new help strings.